<%= form_for(@event, :html => {:autocomplete => "off"}) do |f| %>
  <div class="field">
    <%= f.label "Name: " %>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label "Owner: " %>
    <%= f.select :owner_id, User.all.map {|user| [user.username, user.id]}, {}, :class => 'small_select', 
                                                                                :selected => @event.owner_id || @current_user.id %>
  </div>
  <div class="field">
    <%= f.label "Duration: " %>
    <%= f.select :duration_type, Event::DURATION_NAMES.map { |dur| [dur[1], dur[0]] }, {},
                 :class => 'small_select' %>
  </div>
  <div class="field">
    <%= f.label "Type: " %>
    <%= f.select :event_type, Event::TYPE_NAMES.map { |type| [type[1], type[0]] }, {}, :class => 'small_select' %> 
  </div>
  <div class="field" id="begin_date">
    <%= f.label "Begin Date: " %>
    <%= f.date_select :begin_date, :default => @custom_start_date ? @custom_start_date : Date.today, :order => [:day, :month, :year]%>
  </div>
  <div class="field" id="end_date">
    <%= f.label "End Date: " %>
    <%= f.date_select :end_date,   :default => @custom_start_date ? @custom_start_date : Date.today, :order => [:day, :month, :year] %>
  </div>
  <div class="field">
    <%= f.label "Description: " %><br />
    <%= f.text_area :description %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
